Random Variables & Probability distributions

Discrete variables

Probability function

For a discrete variable X that can take values from a1,a2,..., there is a probability function for X:

pi=P(X=ai)(i=1,2,...)

There are two major types of distributions for discrete variables (based on pi): Binominal distribution, and Poisson distribution.

- Binominal distribution

X∼B(n,p)pi=b(i;n,p)=(ni)pi(1−p)n−i

example: observe X times of heads when flipping coins for N times. Then X=1, 2, ..., N follows this distribution.

X¯=np Var(X)=np(1−p)
Bernoulli distribution

The Bernoulli distribution is a special case of the binomial distribution with n=1.

  • Mean X¯=p
  • Var(X) = p(1-p)

Poisson distribution

X∼P(λ)P(X=i)=e−λλii!

It always works when X represents the number of events that happen within a temporal or spatial domain.

Binominal → Poisson

Poisson is an extreme case of binominal distribution:

for X∼B(n,p), when n is large & p is small & np = \lambda is not too large, then X∼P(λ).


Continuous variables

Probability density function (PDF)

For continuous variables, probability density functions are more useful than cumulative distribution functions.

For a continuous variable X with its CDF F(x), there is a probability density function of x:

f(x)=F′(x)

The probability density function has 3 features:

f(x)≥0∫_−∞∞f(x)dx=1P(a≤X≤b)=F(b)−F(a)=∫abf(x)dx
Important

  • The PDF's analog for discrete variables is probability mass function (PMF). But, they are not same!!!
  • PDF is not Probability! It only means how much probability is concentrated per unit length (d𝒙) near 𝒙, or how dense the probability is near 𝒙.
  • For discrete random variables, we look up the value of a PMF at a single point to find its probability P(𝐗=𝒙).
  • For continuous random variables, we take an integral of a PDF over a certain interval to find its probability that X will fall in that interval.
  • Thus, PDF can be greater than 1, such as in an exponential distribution:
    Pasted image 20230621135607.png300

There are several major types of distributions for continuous variables (based on PDF):

Normal distribution

X∼N(μ,σ2)f(x)=12πσe−(x−μ)22σ2

Exponential distribution

X∼exp(λ)f(x)=λe−λx  (x>0)

Weibull distribution

The exponential distribution is a special case of the Weibull distribution with \alpha = 1.

PDF:

f(x)=λαxα−1e−λxα  (x>0)

CDF:

F(x)=1−eλxα

Uniform distribution

f(x)=1b−a  (a≤x≤b)